<template>
	<view class="cg-back-top">
		<u-back-top :customStyle="customStyle" :top="30" icon="arrow-up" v-bind="$attrs">
			<view class="back-top" @click="onClick">
				<cg-image width="73rpx" height="72rpx" src="icon/mescroll-totop.png" shape="circle"></cg-image>
			</view>

		</u-back-top>
	</view>
</template>

<script>
	export default {
		name: "cg-back-top",
		props: {
			customStyle: {
				type: Object,
				default: () => {
					return {
						width: '120rpx',
						height: '120rpx',
						// fontSize: '20rpx',
						// backgroundColor: '#FFFFFF',

					}
				}
			}
		},
		data() {
			return {
				scrollTop: 0,
				mode: 'square',

			};
		},
		methods:{
			onClick() {
				console.log(12);
				uni.pageScrollTo({
					scrollTop: 0,
					duration: 300
				});
			}
		}

	}
</script>

<style lang="scss">
	.back-top {
		// width: 120rpx;
		// height: 120rpx;
		// border-radius: 0rpx 0rpx 0rpx 0rpx;
		// opacity: 1;
		// font-size: 20rpx;
		// border-radius: 50%;
		// background-color: #ffffff;
		// display: flex;
		// align-items: center;
		// flex-direction: column;
		// justify-content: space-around;
		// padding: 10rpx 0;
		// box-sizing: border-box;
		// box-shadow: 1rpx 1rpx 36rpx  #a99e9e ;
	}
</style>